package com.ruoyi.training.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.training.mapper.TariningEvaluationResourceMonitorMapper;
import com.ruoyi.training.domain.TariningEvaluationResourceMonitor;
import com.ruoyi.training.service.ITariningEvaluationResourceMonitorService;

/**
 * 评测资源监控Service业务层处理
 * 
 * @author rocc
 * @date 2025-06-12
 */
@Service
public class TariningEvaluationResourceMonitorServiceImpl implements ITariningEvaluationResourceMonitorService 
{
    @Autowired
    private TariningEvaluationResourceMonitorMapper tariningEvaluationResourceMonitorMapper;

    /**
     * 查询评测资源监控
     * 
     * @param id 评测资源监控主键
     * @return 评测资源监控
     */
    @Override
    public TariningEvaluationResourceMonitor selectTariningEvaluationResourceMonitorById(Long id)
    {
        return tariningEvaluationResourceMonitorMapper.selectTariningEvaluationResourceMonitorById(id);
    }

    /**
     * 查询评测资源监控列表
     * 
     * @param tariningEvaluationResourceMonitor 评测资源监控
     * @return 评测资源监控
     */
    @Override
    public List<TariningEvaluationResourceMonitor> selectTariningEvaluationResourceMonitorList(TariningEvaluationResourceMonitor tariningEvaluationResourceMonitor)
    {
        return tariningEvaluationResourceMonitorMapper.selectTariningEvaluationResourceMonitorList(tariningEvaluationResourceMonitor);
    }

    /**
     * 新增评测资源监控
     * 
     * @param tariningEvaluationResourceMonitor 评测资源监控
     * @return 结果
     */
    @Override
    public int insertTariningEvaluationResourceMonitor(TariningEvaluationResourceMonitor tariningEvaluationResourceMonitor)
    {
        tariningEvaluationResourceMonitor.setCreateTime(DateUtils.getNowDate());
        return tariningEvaluationResourceMonitorMapper.insertTariningEvaluationResourceMonitor(tariningEvaluationResourceMonitor);
    }

    /**
     * 修改评测资源监控
     * 
     * @param tariningEvaluationResourceMonitor 评测资源监控
     * @return 结果
     */
    @Override
    public int updateTariningEvaluationResourceMonitor(TariningEvaluationResourceMonitor tariningEvaluationResourceMonitor)
    {
        tariningEvaluationResourceMonitor.setUpdateTime(DateUtils.getNowDate());
        return tariningEvaluationResourceMonitorMapper.updateTariningEvaluationResourceMonitor(tariningEvaluationResourceMonitor);
    }

    /**
     * 批量删除评测资源监控
     * 
     * @param ids 需要删除的评测资源监控主键
     * @return 结果
     */
    @Override
    public int deleteTariningEvaluationResourceMonitorByIds(Long[] ids)
    {
        return tariningEvaluationResourceMonitorMapper.deleteTariningEvaluationResourceMonitorByIds(ids);
    }

    /**
     * 删除评测资源监控信息
     * 
     * @param id 评测资源监控主键
     * @return 结果
     */
    @Override
    public int deleteTariningEvaluationResourceMonitorById(Long id)
    {
        return tariningEvaluationResourceMonitorMapper.deleteTariningEvaluationResourceMonitorById(id);
    }
}
